
import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from "@/views/Login/Login.vue"

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    name: "login",
    component: Login,
    meta: {
      breadcrumb: "登录",
    },
  },
  {
    path: "/index",
    name: "index",
    component: () => import("@/views/Index/Index.vue"),
    meta: {
      breadcrumb: "首页",
    },
    children: [
      
      {
        path: "manager",
        name: "manager",
        meta: {
          breadcrumb: "管理员",
        },
        component: () => import("@/views/Manager/Manager.vue"),
      },
      {
        path: "publish",
        name: "publish",
        meta: {
          breadcrumb: "发布信息",
        },
        component: () => import("@/views/Publish/Publish.vue"),
      },
      {
        path: "matching",
        name: "matching",
        meta: {
          breadcrumb: "匹配条件",
        },
        component: () => import("@/views/Matching/Matching.vue"),
      },
      {
        path: "city",
        name: "city",
        meta: {
          breadcrumb: "同城推荐",
        },
        component: () => import("@/views/City/City.vue"),
      },
      {
        path: "user",
        name: "user",
        meta: {
          breadcrumb: "用户信息",
        },
        component: () => import("@/views/User/User.vue"),
      },
      {
        path: "miss",
        name: "miss",
        meta: {
          breadcrumb: "约会信息",
        },
        component: () => import("@/views/Miss/Miss.vue"),
      },
      {
        path: "news",
        name: "news",
        meta: {
          breadcrumb: "消息接收",
        },
        component: () => import("@/views/News/News.vue"),
      },
    ],
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router